package com.example.wemedia.controller;

import com.usian.common.kafka.KafkaTopic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class KafkaController {

    @Autowired
    private KafkaTemplate kafkaTemplate;


    @GetMapping("send_message")
    public void getTopic(String id){
        kafkaTemplate.send(KafkaTopic.TOPIC,id);
    }

}
